<?php
/** @var string $sid */
/** @var object $arr_data */

$player = $game->player_get_uinfo();
//$getbagzbcmd = $game->create_url( "cmd=bagzb&cmd2=bagzb");

//$clubplayer = \player\getclubplayer_once($sid,$dblj);
//if ($clubplayer){
//    $club = \player\getclub($clubplayer->clubid,$dblj);
//    $clubcmd = $encode->encode("cmd=club&sid=$sid");
//    $clubname ="<a href='?cmd=$clubcmd'>$club->clubname</a>";
//}else{
//    $clubname = "无门无派";
//}


switch ($arr_data->cmd2){
    case 'xxzb':
        if (isset($arr_data->xxzb)){
            $game->player_tool_xzzb($arr_data->xxzb);
            $player = $game->player_get_uinfo();
        }
        break;
    case 'setzb':
        $game->player_tool_setzb( $arr_data->zbid , $arr_data->tool);
        break;
}

$player = $game->player_get_uinfo();
$装备数组 = [];

$player = (array) $player;
for ($i = 1 ; $i <= 6 ; $i++){
    $装备数组[$i] = "";
    if ($player["tool$i"]){

        $zhuangbei = $game->zb_get($player["tool$i"]);
        if ($zhuangbei->qianghua > 0 ){
            $qhs = "+{$zhuangbei->qianghua}";
        }else{
            $qhs = '';
        }

        $downzb = $game->create_url( "cmd=zhuangtai&cmd2=xxzb&xxzb=1","卸下");
        $zbinfo = $game->create_url( "cmd=zbinfo&cmd2=zbinfo&zbnowid={$player["tool$i"]}","{$zhuangbei->zbname}{$qhs}");

        $装备数组[$i] = "{$zbinfo}{$downzb}";
    }
}
$player = (object) $player;

$变量_状态 = (object)array(
    "链接_装备1" => $装备数组[1],
    "链接_装备2" => $装备数组[2],
    "链接_装备3" => $装备数组[3],
    "链接_装备4" => $装备数组[4],
    "链接_装备5" => $装备数组[5],
    "链接_装备6" => $装备数组[6]
);


$dis_zhuangtai = $game->dis_get('排版_当前玩家状态');

eval("\$out_html = \"$dis_zhuangtai->dis_string\";");
$out_html = str_replace("<br/><br/>", "<br/>",$out_html);
$out_html = str_replace("<br/><br/>", "<br/>",$out_html);
$out_html = str_replace("</div><br/>", "</div>",$out_html);
echo $out_html;

/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2016/6/10
 * Time: 17:34
 */?>